<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>自定义Marker图标</title>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <meta name="viewport" content="initial-scale=1.0, user-scalable=no">
        <meta http-equiv="X-UA-Compatible" content="IE=Edge">
        <style>
        body,
        html,
        #container {
            overflow: hidden;
            width: 100%;
            height: 100%;
            margin: 0;
            font-family: "微软雅黑";
        }
        </style>
        <script src="//api.map.baidu.com/api?type=webgl&v=1.0&ak=1zMBnGywhkQnGElDo8rBdwGl4mUcQMFg"></script>
    </head>
<body>
    <div id="container"></div>
</body>
</html>
<script type="text/javascript">
var map = new BMapGL.Map('container');
var point = new BMapGL.Point(116.404, 39.915);
map.centerAndZoom(point, 15);
// 创建小车图标 
// https://j2.58cdn.com.cn/dist/jxt/images/roadexam/baidu_car.png
// var myIcon = new BMapGL.Icon("https://lbsyun.baidu.com/jsdemo/img/car.png", new BMapGL.Size(52, 26));
  
  var myIcon = new BMapGL.Icon("car2.png", new BMapGL.Size(60, 60),{
      imageSize: new BMapGL.Size(60, 60)
  });

// 创建Marker标注，使用小车图标
var pt = new BMapGL.Point(116.417, 39.909);
var marker = new BMapGL.Marker(pt, {
    icon: myIcon
});
// 将标注添加到地图
map.addOverlay(marker);
</script>